<template>
  <div>
    <div class="teacher-list" v-for="(item,index) in type.educationLIST" :key="index" @click="goTeacherDeatils(item)">
      <section class="teacher-avatar"><img :src="item.img"></section>
      <section class="teacher-text">
        <p>{{item.name}}</p>
        <p>{{item.label}}</p>
        <p>{{item.ygbq}}</p>
        <p>{{item.count_sum}}次学习 | 共{{item.curriculum}}课时</p>
      </section>
    </div>
  </div>
</template>

<script>
export default {
  props: ['type'],
  methods: {
    goTeacherDeatils (item) {
      this.$router.push({
        path: '/teacher',
        query: {
          lecturer_id: item.lecturer_id
        }
      })
    }
  },
  data () {
    return {

    }
  },
  components: {

  }
}
</script>

<style lang="less" scoped>
.teacher-list {
  width: calc(100vw * 670 / 750);
  height: calc(210 / 750 * 100vw);
  margin: 0 auto;
  display: flex;
  font-family: "PingFangSC-Medium";
  margin-bottom: 25px;
  .teacher-avatar {
    width: calc(178 / 750 * 100vw);
    height: calc(210 / 750 * 100vw);
    margin-right: 20px;
    border-radius: 5px;
    overflow: hidden;
    img{
      width: 100%;
      height: 100%;
    }
  }
  .teacher-text {
    flex: 1;
    font-size: 0px;
    height: 100%;
    position: relative;
    p {
      letter-spacing: 0.46px;
      text-overflow: ellipsis;
      display: -webkit-box;
      /* -webkit-box-orient: vertical; */
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 1;
      overflow: hidden;
    }
    p:first-of-type {
      width: 100%;
      font-weight: bold;
      color: #333333;
      font-size: 15px;
      margin-bottom: 10px;
    }
    p:nth-of-type(2) {
      width: 100%;
      color: #999;
      font-size: 12px;
      margin-bottom: 10px;
    }
    p:nth-of-type(3) {
      width: 100%;
      color: #999;
      font-size: 12px;
      margin-bottom: 16px;
    }
    p:nth-of-type(4) {
      position: absolute;
      bottom: 0;
      width: 100%;
      color: #999;
      font-size: 12px;
    }
  }
}
</style>
